package com.zbkj.dal.feign.req;

import lombok.Data;

import java.util.Collections;
import java.util.List;

@Data
public class RobotMessage {
    private String msgtype;

    private MessageContent text;

    public static RobotMessage generate(String content) {
        MessageContent messageContent = new MessageContent();
        messageContent.setContent(content);
        messageContent.setMentioned_mobile_list(Collections.singletonList("@all"));

        RobotMessage robotMessage = new RobotMessage();
        robotMessage.setMsgtype("text");
        robotMessage.setText(messageContent);

        return robotMessage;
    }

    @Data
    public static class MessageContent {
        private String content;

        private List<String> mentioned_mobile_list;
    }

}